import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import index from  '../views/user/Index'
import Login from "@/views/Login";
import AdminLayout from "@/views/AdminLayout";

Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        component: AdminLayout,
        children: [
            {
                path: '/Home',
                name: 'Home',
                component: Home
            },
            {
                path: '/user/Index',
                name: 'Index',
                component: index
            }
        ]
    },
    {
        // 登录页面
        path: '/login',
        name: 'Login',
        component: Login
    }
]

const router = new VueRouter({
    routes
})

export default router
